package AnalizadorSintactico;

import AnalizadorLexico.Lexema;

public class TerminoExpLogica {

	private Lexema bool;
	private Lexema id;
	private ExpresionRelacional exp;
	private LlamadaAMetodo llamada;
	private ExpresionLogica expL;

	public TerminoExpLogica(Lexema bool, Lexema id, ExpresionRelacional exp,
			LlamadaAMetodo llamada, ExpresionLogica expL) {
		this.bool = bool;
		this.id = id;
		this.exp = exp;
		this.llamada = llamada;
		this.expL = expL;
	}

	@Override
	public String toString() {
		String tpl = "";
		if (bool != null) {
			tpl = bool.getLexema();
		}
		if (id != null) {
			tpl = id.getLexema();
		}
		if (exp != null) {
			tpl = exp.toString();
		}
		if (llamada != null) {
			tpl = llamada.toString();
		}
		if (expL != null) {
			tpl = expL.toString();
		}
		return tpl;
	}
}
